import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useConsultStore = defineStore(
	'consult',
	() => {
		const initalValue = ref({
			illnessDesc: '',
			illnessTime: '',
			consultFlag: '',
			pictures: [],
		})
		// 个人问诊信息
		const consultValue = ref({ ...initalValue.value })
		// 看病途径
		const type = ref('')
		// 问诊方式
		const illnessType = ref('')
		// 科室
		const depId = ref('')
		// 患者ID
		const patientId = ref('')
		return {
			initalValue,
			consultValue,
			type,
			illnessType,
			depId,
			patientId,
		}
	},
	{
		persist: {
			paths: true,
			key:'__persistedstate__consult'
		},
	}
)
